﻿using RockBus.Utilities;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace RockBus.Monitoring.DataContracts
{
    [DataContract(Namespace = NamespaceConstants.MonitoringNamespace)]
    public class PerformanceCountersResponse
    {
        public PerformanceCountersResponse()
        {
        }

        public PerformanceCountersResponse(IEnumerable<PerformanceCounterInstance> instances)
            : this()
        {
            this.Instances = new List<PerformanceCounterInstance>(instances);
        }

        [DataMember]
        public IEnumerable<PerformanceCounterInstance> Instances { get; private set; }

        public override string ToString()
        {
            return this.Instances.EnumerableToString();
        }
    }
}
